import 'package:flutter/cupertino.dart';
import 'package:flutter_app/common/utils/screen.dart';
import 'package:flutter_app/common/values/colors.dart';

class FeatureItem extends StatelessWidget {

  final String imageName;
  final String intro;
  final double marginTop;

  const FeatureItem(this.imageName, this.intro, this.marginTop, { Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      width: duSetWidth(295),
      height: duSetHeight(80),
      margin: EdgeInsets.only(top: duSetHeight(marginTop)),
      child: Row(
        children: [
          Container(
            width: duSetWidth(80),
            height: duSetWidth(80),
            child: Image.asset(
              "assets/images/$imageName.png",
              fit: BoxFit.none,
            ),
          ),
          Spacer(),
          Container(

            width: duSetWidth(195),
            child: Text(
              intro,
              textAlign: TextAlign.left,
              style: TextStyle(
                color: AppColors.primaryText,
                fontFamily: "Avenir",
                fontWeight: FontWeight.normal,
                fontSize: duSetFontSize(16),
              ),
            ),
          ),
        ],
      ),
    );
  }
}
